#include <GL/glut.h>

#include "Level.h"

void Level::Update()
{
	// Draw ground
	glColor3f(0.0f, 1.0f, 0.0);
	glBegin(GL_QUADS);
		for (int x = 0; x < 20; x++)
		{
			for (int y = 0; y < 20; y++)
			{	
				float height = 0;
				if (x == y && x%5 == 0)
					height = 32;
				glVertex3f(x*80, height, -y*80); 
				glVertex3f(x*80, height, -(y+1)*80);
				glVertex3f((x+1)*80, height, -(y+1)*80);
				glVertex3f((x+1)*80, height, -y*80);
			}
		}
	glEnd();
}